//
// Copyright (c) 2009-2011, chunquedong
//
// This file is part of ChunMap project
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
//
// History:
//   2011-05-05  Jed Young  Creation
//

using fan3dTouch
using chunmapView

**
** Tool is a interactive object with map
**
@Js
abstract class Tool
{
  MapCanvas? map
  ViewPort view() { map.viewPort }

  virtual Void onAdd(MapCanvas context) { map = context }

  virtual Void onRemove() {}

  Str id := Uuid().toStr

  Bool isActive := true

  abstract Void actionEvent(MotionEvent e)
}

